<?
class Yamarket_Form_Offers extends Yamarket_Form_OffersNew{
    public function init(){
        parent::init();
        $this->addElement('text', 'Id', array(
            'label'      => 'Id:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        	'validators' => array('Int')
            )
        );
		$this->addElement('text', 'Price', array(
            'label'      => 'Price:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        	'validators' => array(new Zend_Validate_Float('en_US'))
            )
        );
        $this->addElement('text', 'Bid', array(
            'label'      => 'Bid:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        	'validators' => array('Int')
            )
        );
		$this->addElement('text', 'Cid', array(
            'label'      => 'Cid:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        	'validators' => array('Int')
            )
        );
		$this->addElement('text', 'CurrencyId', array(
            'label'      => 'CurrencyId:',
        	'filters'    => array('StringTrim','StripTags'),
			'validators' => array(array('validator' => 'StringLength', 'options' => array(1, 64)))
            )
        );
		$this->addElement('text', 'CategoryId', array(
            'label'      => 'CategoryId:',
        	'filters'    => array('StringTrim','StripTags'),
            'required'   => true,
        	'validators' => array('Int')
            )
        );
        $this->addElement('text', 'TypePrefix', array(
            'label'      => 'TypePrefix:',
        	'filters'    => array('StringTrim','StripTags'),
        	'validators' => array(array('validator' => 'StringLength', 'options' => array(1, 255)))
            )
        );
		$this->addElement('text', 'Vendor', array(
            'label'      => 'Vendor:',
        	'filters'    => array('StringTrim','StripTags'),
        	'validators' => array(array('validator' => 'StringLength', 'options' => array(1, 255)))
            )
        );
        $this->addElement('text', 'VendorCode', array(
            'label'      => 'VendorCode:',
        	'filters'    => array('StringTrim','StripTags'),
        	'validators' => array(array('validator' => 'StringLength', 'options' => array(1, 255)))
            )
        );
		$this->addElement('text', 'Model', array(
            'label'      => 'Model:',
        	'filters'    => array('StringTrim','StripTags'),
        	'validators' => array(array('validator' => 'StringLength', 'options' => array(1, 255)))
            )
        );
		$this->addElement('text', 'Store', array('filters' => array('Int')));
		$this->addElement('text', 'Pickup', array('filters' => array('Int')));
		$this->addElement('text', 'Delivery', array('filters' => array('Int')));
		$this->addElement('text', 'Description', 
            array(
                'label'      => 'Description:',
                'filters'    => array(
                    'StringTrim',
                    'StripTags'
                    ,array(
                        'filter'    =>'Callback',
                        'options'   =>array(
                            'callback' => 'mb_substr',
                            'options'  => array('key' => 0, 'key2' => 511, 'key3'=>'utf-8')
                            )
                    )
                )
            )
        );
		$this->addElement('text', 'LocalDeliveryCost', array(
            'label'      => 'LocalDeliveryCost:',
        	'filters'    => array('StringTrim','StripTags'),
            )
        );
		$this->addElement('text', 'Available', array('filters' => array('Int')));
		$this->addElement('text', 'SalesNotes', array(
            'label'      => 'SalesNotes:',
        	'filters'    => array('StringTrim','StripTags'),
            )
        );
		$this->addElement('text', 'ManufacturerWarranty',array('filters' => array('Int')));
		$this->addElement('text', 'CountryOfOrigin', array(
            'label'      => 'CountryOfOrigin:',
        	'filters'    => array('StringTrim','StripTags'),
            )
        );
        $this->addElement('text', 'Publish', array('filters'    => array('Int')));
	}
}
?>